package com.xsomnus.design_patterns.structors.decorator;

/**
 * @author 叶小夏
 * @since 2019-08-27 10:42
 */
public class Milk extends Decorator {

    private static final String desc = "加了牛奶";

    private Beverage beverage;

    public Milk(Beverage beverage) {
        this.beverage = beverage;
    }

    @Override
    public String desc() {
        return beverage.desc() + "\t" + desc;
    }

    @Override
    public Double price() {
        return beverage.price() + 20;
    }
}
